package com.qf.common.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.Date;

@Data
@TableName("sport_day")
@ApiModel(description = "每天运动记录")
public class SportDay {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "用户id",example = "1",hidden = true)
    private Integer userId;
    @ApiModelProperty(value = "运动时长,单位分钟",example = "30")
    private Integer duration;
    @ApiModelProperty(value = "运动距离，单位米",example = "30")
    private double distance;
    @ApiModelProperty(value = "运动步数")
    private Integer steps;
    @ApiModelProperty(value = "消耗卡路里,单位卡",example = "30")
    private Integer caloriesBurned;
    @ApiModelProperty(value = "运动目标步数")
    private Integer targetSteps;
    @ApiModelProperty(value = "运动目标距离，单位米",example = "30")
    private Double targetDistance;
    @ApiModelProperty(value = "运动记录日期",example = "2021-07-01 12:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "today_time")
    private LocalDate todayTime;
    @ApiModelProperty(value = "创建时间",example = "2021-07-01 12:00:00",hidden = true)
    private Date createTime;
    @ApiModelProperty(value = "更新时间",example = "2021-07-01 12:00:00",hidden = true)
    private Date updateTime;
}
